package com.ruoyi.StoreRealMoney.service.impl;

import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import com.ruoyi.StoreRealMoney.mapper.StoreRealmoneyMapper;
import com.ruoyi.StoreRealMoney.domain.StoreRealmoney;
import com.ruoyi.StoreRealMoney.service.IStoreRealmoneyService;
import com.ruoyi.common.core.text.Convert;

/**
 * 商家提现 服务层实现
 * 
 * @author ruoyi
 * @date 2019-08-01
 */
@Service
public class StoreRealmoneyServiceImpl implements IStoreRealmoneyService 
{
	@Autowired
	private StoreRealmoneyMapper storeRealmoneyMapper;

	/**
     * 查询商家提现信息
     * 
     * @param id 商家提现ID
     * @return 商家提现信息
     */
    @Override
	public StoreRealmoney selectStoreRealmoneyById(Integer id)
	{
	    return storeRealmoneyMapper.selectStoreRealmoneyById(id);
	}
	
	/**
     * 查询商家提现列表
     * 
     * @param storeRealmoney 商家提现信息
     * @return 商家提现集合
     */
	@Override
	public List<StoreRealmoney> selectStoreRealmoneyList(StoreRealmoney storeRealmoney)
	{
	    return storeRealmoneyMapper.selectStoreRealmoneyList(storeRealmoney);
	}
	
    /**
     * 新增商家提现
     * 
     * @param storeRealmoney 商家提现信息
     * @return 结果
     */
	@Override
	public int insertStoreRealmoney(StoreRealmoney storeRealmoney)
	{
	    return storeRealmoneyMapper.insertStoreRealmoney(storeRealmoney);
	}
	
	/**
     * 修改商家提现
     * 
     * @param storeRealmoney 商家提现信息
     * @return 结果
     */
	@Override
	public int updateStoreRealmoney(StoreRealmoney storeRealmoney)
	{
	    return storeRealmoneyMapper.updateStoreRealmoney(storeRealmoney);
	}

	/**
     * 删除商家提现对象
     * 
     * @param ids 需要删除的数据ID
     * @return 结果
     */
	@Override
	public int deleteStoreRealmoneyByIds(String ids)
	{
		return storeRealmoneyMapper.deleteStoreRealmoneyByIds(Convert.toStrArray(ids));
	}

	@Override
	public Double selectRealMoneyGot(String storeName) {
		return storeRealmoneyMapper.selectRealMoneyGot(storeName);
	}
	
}
